package org.scirp.ijmis.dao.personpaper.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.scirp.ijmis.dao.base.impl.BaseDAOImpl;
import org.scirp.ijmis.dao.personpaper.IPublicationOfPaperDAO;
import org.scirp.ijmis.po.personpaper.Publication;
import org.scirp.ijmis.po.personpaper.PublicationOfPaper;

public class PublicationOfPaperDAOImpl extends BaseDAOImpl<PublicationOfPaper> implements IPublicationOfPaperDAO {

	private static final String className = PublicationOfPaperDAOImpl.class.toString();

	public List<PublicationOfPaper> selectAll() {

		String hql = "from PublicationOfPaper order by pid desc";
		return super.ExecuteQuery(hql, className + "-->selectAll");
	}

	public Long countObject() {
		return super.countObject(className + "-->selectAll");
	}

	public PublicationOfPaper selectById(Object id) {

		return (PublicationOfPaper) super.selectById(id, className + "-->selectById");
	}

	public long savePublicationOfPaper(PublicationOfPaper entity) {
		return super.saveObject(entity, className + "-->savePublicationOfPaper(PublicationOfPaper entity)");
	}

	public boolean updatePublicationOfPaper(PublicationOfPaper entity) {
		return super.updateObject(entity, className + "-->updatePublicationOfPaper(PublicationOfPaper entity)");
	}

	public PublicationOfPaper deletePublicationOfPaper(PublicationOfPaper entity) {
		return super.deleteObject(entity, className + "-->deletePublicationOfPaper(PublicationOfPaper entity)");
	}

	public List<PublicationOfPaper> selectPublicationOfPaperByPaperId(Long paperId) {
		String hql = "from PublicationOfPaper where paperId=" + paperId;
		return super.select(hql, 0, 0, className + "-->selectPublicationOfPaperByPaperId(Long paperId)");

	}

	public List<PublicationOfPaper> selectPublicationOfPaperByPublicationId(Long publicationId) {
		String hql = "from PublicationOfPaper where publicationId=" + publicationId;
		return super.select(hql, 0, 0, className + "-->selectPublicationOfPaperByPublicationId(Long publicationId)");
	}
}
